/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "processmaster")
@XmlRootElement(name = "processmaster")
@NamedQueries({
    @NamedQuery(name = "Processmaster.findAll", query = "SELECT p FROM Processmaster p"),
    @NamedQuery(name = "Processmaster.findByProcessMasterID", query = "SELECT p FROM Processmaster p WHERE p.processMasterID = :processMasterID"),
    @NamedQuery(name = "Processmaster.findByParentID", query = "SELECT p FROM Processmaster p WHERE p.parentID = :parentID"),
    @NamedQuery(name = "Processmaster.findByProcessname", query = "SELECT p FROM Processmaster p WHERE p.processname = :processname"),
    @NamedQuery(name = "Processmaster.findByProcesslabel", query = "SELECT p FROM Processmaster p WHERE p.processlabel = :processlabel"),
    @NamedQuery(name = "Processmaster.findByProcssspagepath", query = "SELECT p FROM Processmaster p WHERE p.procssspagepath = :procssspagepath"),
    @NamedQuery(name = "Processmaster.findByYear", query = "SELECT p FROM Processmaster p WHERE p.year = :year"),
    @NamedQuery(name = "Processmaster.findByDescription", query = "SELECT p FROM Processmaster p WHERE p.description = :description"),
    @NamedQuery(name = "Processmaster.findByDepth", query = "SELECT p FROM Processmaster p WHERE p.depth = :depth"),
    @NamedQuery(name = "Processmaster.findByLineage", query = "SELECT p FROM Processmaster p WHERE p.lineage = :lineage"),
    @NamedQuery(name = "Processmaster.findByProcessIDorder", query = "SELECT p FROM Processmaster p WHERE p.processIDorder = :processIDorder"),
    @NamedQuery(name = "Processmaster.findByAltprocessname", query = "SELECT p FROM Processmaster p WHERE p.altprocessname = :altprocessname"),
    @NamedQuery(name = "Processmaster.findByIsadmin", query = "SELECT p FROM Processmaster p WHERE p.isadmin = :isadmin"),
    @NamedQuery(name = "Processmaster.findByCreateddate", query = "SELECT p FROM Processmaster p WHERE p.createddate = :createddate"),
    @NamedQuery(name = "Processmaster.findByLastupdated", query = "SELECT p FROM Processmaster p WHERE p.lastupdated = :lastupdated"),
    @NamedQuery(name = "Processmaster.findByDeletedon", query = "SELECT p FROM Processmaster p WHERE p.deletedon = :deletedon"),
    @NamedQuery(name = "Processmaster.findByIsdeleted", query = "SELECT p FROM Processmaster p WHERE p.isdeleted = :isdeleted")})
public class Processmaster implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ProcessMasterID")
    private Long processMasterID;
    @Column(name = "parentID")
    private BigInteger parentID;
    @Column(name = "processname")
    private String processname;
    @Column(name = "processlabel")
    private String processlabel;
    @Column(name = "procssspagepath")
    private String procssspagepath;
    @Column(name = "year")
    @Temporal(TemporalType.DATE)
    private Date year;
    @Column(name = "description")
    private String description;
    @Column(name = "depth")
    private Integer depth;
    @Column(name = "lineage")
    private String lineage;
    @Column(name = "processIDorder")
    private Integer processIDorder;
    @Column(name = "altprocessname")
    private String altprocessname;
    @Column(name = "isadmin")
    private Short isadmin;
    @Column(name = "createddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createddate;
    @Column(name = "lastupdated")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastupdated;
    @Column(name = "deletedon")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deletedon;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @JoinColumn(name = "employee_EmployeeID_deletedby", referencedColumnName = "EmployeeID")
    @ManyToOne(fetch=FetchType.LAZY)
    private Employee employee;
    @JoinColumn(name = "employee_EmployeeID_updatedby", referencedColumnName = "EmployeeID")
    @ManyToOne(fetch=FetchType.LAZY)
    private Employee employee1;

    public Processmaster() {
    }

    public Processmaster(Long processMasterID) {
        this.processMasterID = processMasterID;
    }

    public Long getProcessMasterID() {
        return processMasterID;
    }

    public void setProcessMasterID(Long processMasterID) {
        this.processMasterID = processMasterID;
    }

    public BigInteger getParentID() {
        return parentID;
    }

    public void setParentID(BigInteger parentID) {
        this.parentID = parentID;
    }

    public String getProcessname() {
        return processname;
    }

    public void setProcessname(String processname) {
        this.processname = processname;
    }

    public String getProcesslabel() {
        return processlabel;
    }

    public void setProcesslabel(String processlabel) {
        this.processlabel = processlabel;
    }

    public String getProcssspagepath() {
        return procssspagepath;
    }

    public void setProcssspagepath(String procssspagepath) {
        this.procssspagepath = procssspagepath;
    }

    public Date getYear() {
        return year;
    }

    public void setYear(Date year) {
        this.year = year;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getDepth() {
        return depth;
    }

    public void setDepth(Integer depth) {
        this.depth = depth;
    }

    public String getLineage() {
        return lineage;
    }

    public void setLineage(String lineage) {
        this.lineage = lineage;
    }

    public Integer getProcessIDorder() {
        return processIDorder;
    }

    public void setProcessIDorder(Integer processIDorder) {
        this.processIDorder = processIDorder;
    }

    public String getAltprocessname() {
        return altprocessname;
    }

    public void setAltprocessname(String altprocessname) {
        this.altprocessname = altprocessname;
    }

    public Short getIsadmin() {
        return isadmin;
    }

    public void setIsadmin(Short isadmin) {
        this.isadmin = isadmin;
    }

    public Date getCreateddate() {
        return createddate;
    }

    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }

    public Date getLastupdated() {
        return lastupdated;
    }

    public void setLastupdated(Date lastupdated) {
        this.lastupdated = lastupdated;
    }

    public Date getDeletedon() {
        return deletedon;
    }

    public void setDeletedon(Date deletedon) {
        this.deletedon = deletedon;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public Employee getEmployee1() {
        return employee1;
    }

    public void setEmployee1(Employee employee1) {
        this.employee1 = employee1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (processMasterID != null ? processMasterID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Processmaster)) {
            return false;
        }
        Processmaster other = (Processmaster) object;
        if ((this.processMasterID == null && other.processMasterID != null) || (this.processMasterID != null && !this.processMasterID.equals(other.processMasterID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Processmaster[processMasterID=" + processMasterID + "]";
    }

}
